package andromeda.core;

import org.htmlparser.util.ParserException;

import parser.core.R;

import andromeda.core.activities.LoginActivity;
import andromeda.httpCommunication.*;

import android.app.Activity;
import android.content.Intent;
import android.net.MailTo;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;
import android.util.Log;

/*
 * +-----------------------------------------------------------------------------+
 * |                                                                             |
 * |  ProjectName: Andromeda                                Date: **072011       |
 * |                                                                             |
 * |  MainActivity.java                                     (W) Rainer Sickinger |
 * |                                                                             |
 * +-----------------------------------------------------------------------------+
 */
public class MainActivity extends Activity implements OnClickListener{
	TextView test;
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        test = (TextView) findViewById(R.id.mainText);
        Button b = (Button) findViewById(R.id.button1);
        b.setOnClickListener(this);
        
        Test t = new Test();
        
        try {
			test.append(t.Login());
		} catch (Exception e) {
			test.append("FAIL");
			e.printStackTrace();
		}
        
    }

	@Override
	public void onClick(View v) {
		if(v == findViewById(R.id.button1)){
			Intent loginIntent = new Intent(this, LoginActivity.class);
			this.startActivity(loginIntent);
		}
	}    
}